﻿using System;
using System.ComponentModel;
using System.Drawing;
using SIToFb2.Properties;

namespace SIToFb2
{
  public class Message
  {
    public DateTime Time { get; set; }
    [DisplayName("Type"), Browsable(false)]
    public MessageType MessageType { get; set; }
    [DisplayName("Type")]
    public Image Icon
    {
      get {
        switch (MessageType)
        {
          case MessageType.Error:
            return Resources.error;
          case MessageType.Warning:
            return Resources.warning;
          case MessageType.Notification:
            return Resources.notify;
          default:
            throw new ArgumentOutOfRangeException();
        }
      }
    }

    [DisplayName("Message")]
    public string Text { get; set; }
  }

  public enum MessageType
  {
    Error,
    Warning,
    Notification,
  }
}